<template>
  <div/>
</template>

<script>
export default {
  data() {
    return {}
  },
  created: function() {
    const { href } = this.$router.resolve({
      name: 'bigScreen'
    })
    const url = `${href}?id=24`
    window.open(url, '_blank')
    this.$router.push('/')
  },
  mounted() {
    /**
     * iframe-宽高自适应显示
     */
    function changeMobsfIframe() {
      const mobsf = document.getElementById('bdIframe')
      const deviceWidth = document.body.clientWidth
      const deviceHeight = document.body.clientHeight
      mobsf.style.width = (Number(deviceWidth) - 120) + 'px'
      mobsf.style.height = (Number(deviceHeight) - 80) + 'px'
    }

    changeMobsfIframe()

    window.onresize = function() {
      changeMobsfIframe()
    }
  }
}
</script>
